<div class="gadget_detail">
	<span id="gadget_details_title">Gadget Details</span>
	<div id="gadget_btns">	
		<button dojoType="dijit.form.Button" onclick="edit_gadget()">Edit</button>
	</div>
	<hr style="clear:both;color:#cccccc;width:80%;" align="left"/><br/>
	<div class="gadget_img">
		<%= image_tag @gadget.photo.url(:main) %>
	</div>
	<div class="gadget_desc">
		<span class="gadget_info_name"><%= @gadget.title %></span><br/>
		<span class="gadget_description"><%= @gadget.description %></span><br/><br/>
		<label>Released:</label> <%= @gadget.created_at %><br/>
		
		<label>Gadget Spec:</label> <a href="<%= @gadget.spec_url %>"><%= @gadget.spec_url %></a>
		&nbsp;&nbsp;<button dojoType="dijit.form.Button" onclick="edit_gadget_spec(<%= @gadget.id %>)">Edit</button>
		<br/><br/>
		<label>Status:</label> 
		<% if @gadget.published %>
			Published &nbsp;&nbsp;
			<button dojoType="dijit.form.Button" onclick="unpublish_gadget(<%= @gadget.id %>)">Unpublish</button>
		<% else %>
			Unpublished &nbsp;&nbsp;
			<button dojoType="dijit.form.Button" onclick="publish_gadget(<%= @gadget.id %>)">Publish</button>
		<% end %>
	</div>
</div>